home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / lib.fmt / c / regex.man < prev    next >
Encoding:
Text File  |  1989-06-01  |  2.1 KB  |  67 lines

  1.  
  2.  
  3.  
  4. REGEX                 C Library Procedures                  REGEX
  5.  
  6.  
  7.  
  8. NNAAMMEE
  9.      re_comp, re_exec - regular expression handler
  10.  
  11. SSYYNNOOPPSSIISS
  12.      cchhaarr **rree__ccoommpp((ss))
  13.      cchhaarr **ss;;
  14.  
  15.      rree__eexxeecc((ss))
  16.      cchhaarr **ss;;
  17.  
  18. DDEESSCCRRIIPPTTIIOONN
  19.      _R_e__c_o_m_p compiles a string into an internal form suitable for
  20.      pattern matching. _R_e__e_x_e_c checks the argument string against
  21.      the last string passed to _r_e__c_o_m_p.
  22.  
  23.      _R_e__c_o_m_p returns 0 if the string _s was compiled successfully;
  24.      otherwise a string containing an error message is returned.
  25.      If _r_e__c_o_m_p is passed 0 or a null string, it returns without
  26.      changing the currently compiled regular expression.
  27.  
  28.      _R_e__e_x_e_c returns 1 if the string _s matches the last compiled
  29.      regular expression, 0 if the string _s failed to match the
  30.      last compiled regular expression, and -1 if the compiled
  31.      regular expression was invalid (indicating an internal
  32.      error).
  33.  
  34.      The strings passed to both _r_e__c_o_m_p and _r_e__e_x_e_c may have
  35.      trailing or embedded newline characters; they are terminated
  36.      by nulls.  The regular expressions recognized are described
  37.      in the manual entry for _e_d(1), given the above difference.
  38.  
  39. SSEEEE AALLSSOO
  40.      ed(1), ex(1), egrep(1), fgrep(1), grep(1), regexp(3)
  41.  
  42. DDIIAAGGNNOOSSTTIICCSS
  43.      _R_e__e_x_e_c returns -1 for an internal error.
  44.  
  45.      _R_e__c_o_m_p returns one of the following strings if an error
  46.      occurs:
  47.  
  48.           _N_o _p_r_e_v_i_o_u_s _r_e_g_u_l_a_r _e_x_p_r_e_s_s_i_o_n,
  49.           _R_e_g_u_l_a_r _e_x_p_r_e_s_s_i_o_n _t_o_o _l_o_n_g,
  50.           _u_n_m_a_t_c_h_e_d _\(,
  51.           _m_i_s_s_i_n_g ],
  52.           _t_o_o _m_a_n_y _\(_\) _p_a_i_r_s,
  53.           _u_n_m_a_t_c_h_e_d _\).
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63. Sprite v1.0               May 19, 1988                          1
  64.  
  65.  
  66.  
  67.